<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <base href="<%=request.getContextPath()+"/"%>">
    <title>Title</title>
</head>
<body>

<h3>部门列表</h3>
<a href="dept/addDept.jsp">添加部门</a>
<table border="1">
    <tr>
        <th>编号</th>
        <th>名称</th>
        <th>位置</th>
        <th>操作</th>
    </tr>

    <c:forEach items="${requestScope.deptList}" var="dept">
        <tr>
            <td>${dept.deptno}</td>
            <td>${dept.dname}</td>
            <td>${dept.loc}</td>
            <td>
                <a href="http://localhost:8080/Dept?action=del&deptno=${dept.deptno}">删除</a>
                <a href="http://localhost:8080/Dept?action=byId&deptno=${dept.deptno}">编辑</a>
            </td>
        </tr>
    </c:forEach>

</table>
</body>
</html>
